package com.qf.controller;

import com.qf.pojo.repVo.BaseResp;
import com.qf.serivce.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacher")
public class TeacherController {
    @Autowired
    TeacherService teacherService ;


    @RequestMapping("/findAll")
    public BaseResp  findAll(){
        return teacherService.findAll();
    }

    @RequestMapping("/findById")
    public BaseResp findById(@RequestParam("id")Integer id){
        return teacherService.findById(id);
    }
}
